import request from '@/utils/requestService'

export function getList(params) {
  return request({
    url: '/dict/search-with-children',
    method: 'get',
    params
  })
}

export function getById(id) {
  return request({
    url: '/dict/' + id,
    method: 'get'
  })
}

export function save(data) {
  return request({
    url: '/dict/',
    method: 'post',
    data: data
  })
}

export function update(id, data) {
  return request({
    url: '/dict/' + id,
    method: 'put',
    data: data
  })
}

export function deleteById(id) {
  return request({
    url: '/dict/' + id,
    method: 'delete'
  })
}
